﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using InSafetyAirClient.InSafetyAirService;

namespace InSafetyAirClient.GUI.PlaneModel
{
    public partial class CreatePM : UserControl
    {
        public CreatePM()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            InSafetyAirService.PlaneModel planeM= new InSafetyAirService.PlaneModel();
            planeM.planeModelName = textBox1.Text;
            planeM.seats = (short)System.Convert.ToInt32(textBox2.Text);
            ServiceSingle.Instance.getService().AddToDatabase(planeM);

            textBox2.Text = "";
            textBox1.Text = "";
        }
    }
}
